<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>运营平台</title>

   
	
	      <import type="css" basepath="__CSS__" file="bootstrap" />

	<import type="css" basepath="__CSS__" file="style" />

</head>

<body>
<div class="topNav">
    <span class="text"><i class="iconfont">&#xe607;</i><a href="/main" target="rightFrame">首页</a>&gt;<span>系统管理</span>&gt;<span>区域管理</span>&gt;<span>编辑区域</span></span>
</div>

<div class="contain">
    <div class="pageTitle">
        <h2 class="title">编辑区域</h2>
    </div>

    <div class="formBoxOne">
        <form action="{:U('Area/saveEdit')}" method="post">
        
            <div class="line">
                <div class="col-md-6 col-sm-6 col-xs-6">
                    <span class="name w100">省</span>
                    <div class="col-md-8 col-sm-8 col-xs-8">
                       <select  id="select_id5" class="inpTextOne form-control" name="select_name5">
                            <option selected="selected" value=''>请选择</option>
                            <foreach name='listAddress'  item='item'>
                            <option value="{$item['id']}"   <if condition="$item['id'] eq $dataInfo['pro_id']"> selected </if> >{$item['name']}</option>
                            </foreach>
                        </select>
                    </div>
                </div>
            </div>
            <div class="line">
                <div class="col-md-6 col-sm-6 col-xs-6">
                    <span class="name w100">市</span>
                    <div class="col-md-8 col-sm-8 col-xs-8">
                     
						 <select id="select_id6"  class="inpTextOne form-control" name="select_name6">
                            <foreach name='listAddressCity'  item='item'>
                            <option value="{$item['id']}"   <if condition="$item['id'] eq $dataInfo['city_id']"> selected </if> >{$item['name']}</option>
                            </foreach>
                        </select>
                    </div>
                </div>
            </div>
            <div class="line">
                <div class="col-md-6 col-sm-6 col-xs-6">
                    <span class="name w100">大学</span>
                    <div class="col-md-8 col-sm-8 col-xs-8">
                        <input type="text" name="school" class="inpTextOne form-control" value="{$dataInfo.name}">
                    </div>
                </div>
            </div>
			 <input type="hidden" id="updateid"  name="school_id"value="{$dataInfo.id}">
            <div class="line">
                <div class="col-md-6 col-sm-6 col-xs-6">
                    <div class="marl100 col-md-8">
                        <button type="submit" class="btn btn-primary" data-type="submit" data-text="保存成功！">保存</button>
                        <a href="{:U('Area/index')}"><button type="button" class="btn btn-info">返回</button></a>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>

<!--提示模态框 begin-->
<div class="modal fade" id="popupPrompt">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title">提示</h4>
            </div>
            <div class="modal-body">
                <p class="text"></p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal">确定</button>
            </div>
        </div>
    </div>
</div>
<!--提示模态框 end-->



<script src="/App/Admin/public/js/jquery-2.1.1.min.js"></script>
<script src="/App/Admin/public/js/bootstrap.min.js"></script>
<script src="/App/Admin/public/js/form.js"></script>



<script type="text/javascript">
$("select").change(function(){
 var t=$(this)
var checkText=$(this).find("option:selected").text();
var checkValue=$(this).find("option:selected").attr("id");
var tid=$(this).find("option:selected").attr("tid");
      $.get('/type/type',{'id':checkValue,'tid':tid},function(data){
        
            t.parent().parent().parent().next().find("select").html("");
            t.parent().parent().parent().next().find("select").append(data);
      })
 
 //alert(checkValue);
});
</script>




<script>
$("#select_id5").change(function(){
var checkValueOne=$("#select_id5").val();
var updateid=$("#updateid").val(); //获取Select选择的Value
/*alert(checkValueOne);die();*/
/*alert(checkValueOne);die();*/
 $.post('{:U('Area/select_address')}',{checkValueOne:checkValueOne,updateid:updateid},function(data){
               $("#select_id6").text(' ');
               $("#select_id6").append(data);
            
        });
});
</script>





</body>
</html>